home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 093 - Land of Spur.dsk / SPUR.MAIN.S < prev    next >
Text File  |  2019-02-17  |  29KB  |  781 lines

  1.                          ; _  _  _  _  _  _  _  _  _
  2.                          ;[_][_][_][_][_][_][_][_][_]
  3.                          ;
  4.                          ;      The Land of SPUR
  5.                          ; 
  6.                          ;      (C)opyright 1987
  7.                          ;        Greg W. Davis
  8.                          ;            and
  9.                          ;      Peripherals Plus
  10.                          ;
  11.                          ; 04/14/87             21:30
  12.                          ;___________________________
  13.                          ;           v3.0       
  14.                          ;        Spur Main        
  15.                          ;       Game Segment
  16.                          ; _  _  _  _  _  _  _  _  _
  17.                          ;[_][_][_][_][_][_][_][_][_]
  18.  
  19.           
  20.           public travel3
  21.           public dropdead
  22.           public flee2
  23.           public dueldead
  24.                        
  25.                          ; ********************
  26.                          ; *  Adventure Menu  *
  27.                          ; ********************
  28.           
  29. advent
  30.           on nocar goto dropped
  31.           if ep>999 then xp=xp+1:ep=ep-999:gosub lvl.msg
  32.           gosub tim.chk:if (ev-ex)<120 print \"Dusk approaches..."\
  33.           if (pe=0) and (ps=0) print \'
  34. Ye        have deprived thyself of nourishment
  35. for       too long.  Ye have died of
  36. starvation!!'\:xn=sn:sn=0:gosub dead:goto dead2
  37.           
  38.           if (pe<6) and (ps<6) print \'
  39. Thy       strength is failing.  Ye are
  40. approaching starvation.'\
  41.           
  42.           if mw gosub m.attack:if pt<8 then zz$=rnd$:a=random(10):if a<5 gosub m.attack
  43. advent2
  44.           di=0
  45.           if bd gosub scn.dsp2
  46.           if i print "You see "it$:else it$=""
  47.           if wp print "You see "wp$:else wp$=""
  48.           if fd print "You see "fd$:else fd$=""
  49.           if md print \"You see a dead "m$\
  50.           print \lo$
  51.           if dc$="" then dc$="?"
  52.           print "Return="dc$
  53.           print "["hp"] Your Command: ";:input @2 i$
  54.           if i$="" then i$=dc$
  55.           if (i$="#") and (info(5)) print \"Room #:"cr:goto advent2
  56.           if i$="EXAMINE" print \"Examine what?":goto advent
  57.           if i$="GET" print \"Get what?":goto advent
  58.           if instr("EXAMINE",i$) then dc$=i$:gosub examine:goto advent
  59.           if instr("DROP",i$) then dc$=i$:goto drop
  60.           if instr("CAST",i$) then dc$=i$:goto link.sub
  61.           if instr("GET",i$) then dc$=i$:goto get
  62.           if instr("READY",i$) then dc$=i$:goto link.sub
  63.           if instr("ATT",i$) then dc$="ATTACK":goto p.attack
  64.           if instr("READ",i$) then dc$=i$:goto rd.book
  65.           if instr("STAT",i$) then dc$="STATUS":dy$=dz$+"spur.sub":link dy$,"show1"
  66.           if instr("INV",i$) then dc$="INVENTORY":dy$=dz$+"spur.sub":link dy$,"show0"
  67.           if (instr("NORTH",i$)) or (i$="N") then di=1:dc$="NORTH":goto travel
  68.           if (instr("SOUTH",i$)) or (i$="S") then di=2:dc$="SOUTH":goto travel
  69.           if (instr("EAST",i$)) or (i$="E") then di=3:dc$="EAST":goto travel
  70.           if (instr("WEST",i$)) or (i$="W") then di=4:dc$="WEST":goto travel
  71.           if (instr("UP",i$)) or (i$="U") then di=5:goto travel
  72.           if (instr("DOWN",i$)) or (i$="D") then di=6:goto travel
  73.           if instr("WEAR",i$) then dc$="":goto link.sub
  74.           if instr("USE",i$) then dc$="":goto link.sub
  75.           if instr("EAT",i$) then dc$="":goto link.sub
  76.           if instr("DRINK",i$) then dc$="":goto link.sub
  77.           if instr("DUEL",i$) goto lnk.duel
  78.           if i$="?" goto menu
  79.           if i$="HELP" setint(1):dy$=dx$+"spur.help":open #1,dy$:copy #1,#0:setint(""):close:goto advent
  80.           if (i$="Q") or (i$="QUIT") goto cnf.quit
  81.           if i$="LOOK" gosub rd.room2:dc$="LOOK":goto advent
  82.           if i$="FLEE" goto flee
  83.           if (i$="*") and ((info(5)) or (un=dm)) then dy$=ds$+"spur.sysop":link dy$
  84.           print \"Illegal command"\:goto advent
  85.  
  86. menu
  87.           setint(1):print \s$\'
  88. [-------------------------------------]
  89. (                   The LAND of SPUR          )
  90. (------------- Game Menu -------------)
  91. [             Ye May Employ these Commands    ]
  92. =======================================
  93. [         DROP - an item  READY  - a weapon   ]
  94. (         GET  - an item  ATTACK - a monster  )
  95. (         CAST - a spell  LOOK   - at a room  )
  96. (         EAT  - food     DRINK  - water/wine )
  97. (         USE  - item     WEAR   - armor      )
  98. (         READ - a book   DUEL   - a player   )
  99. (             EXAMINE - Examine an object     )
  100. (                FLEE - random exit           )
  101. (               STATS - Your Current Status   )
  102. [                 INV - Display Inventory     ]
  103. =======================================
  104. [                    Ye may travel:           ]
  105. (          [N]ORTH  [S]OUTH  [E]AST  [W]EST   )
  106. [                   [U]p     [D]own           ]
  107. =======================================
  108. [         HELP - SPUR Help   QUIT - Quit game ]
  109.           -------------------------------------
  110. ':setint(""):print "Press [RETURN] ";:get i$:if i$=chr$(13) print " ";
  111.           print chr$(8,16);chr$(32,16);chr$(8,16):goto advent
  112.  
  113.                          ; *****************
  114.                          ; *  Random Move  *
  115.                          ; *****************
  116.           
  117. flee
  118.           if pe<1 print \"Not enough energy...":goto advent
  119.           if ep>2 then ep=ep-2
  120.           if pe<3 then pe=0:else pe=pe-3
  121.           if pw>0 then pw=pw-1
  122.           if pi<6 print \'
  123. Your      lack of intelligence has made
  124. it        impossible for you to flee!':goto advent
  125. flee2
  126.           zz$=rnd$:cr=random(nr):if cr=0 goto flee2
  127.           goto travel1
  128.  
  129.                          ; ******************
  130.                          ; *  Change Rooms  *
  131.                          ; ******************
  132.           
  133. travel
  134.           if pe<1 print \"Not enough energy to move...":goto advent
  135.           if mw then zz$=rnd$:a=random(ms):if a>7 print \m$" blocks the path!":goto advent
  136.           x=nr-ri:y=cr mod ri
  137.           if (di=1) and (n) then cr=(cr<=ri)*nr+cr-ri:goto travel1
  138.           if (di=2) and (s) then cr=cr+ri-((cr>x)*nr):goto travel1
  139.           if (di=3) and (e) then cr=cr+1-((y=0)*ri):goto travel1
  140.           if (di=4) and (w) then cr=cr+((y=1)*ri)-1:goto travel1
  141.           if (di=5) and (rc=1) goto travel3
  142.           if (di=6) and (rc=2) goto travel3
  143.           print \"No Exit there!":goto advent
  144. travel1
  145.           if (pe>4) or (ps>4) goto travel1a
  146.           if pt>0 then pt=pt-1
  147. travel1a
  148.           if (not mw) goto travel2
  149.           if wr$="" goto travel1b
  150.           if (sw<>0) and ((wr$<>sw$) or (p1<>0)) goto travel1b
  151.           a=wa:b=ma:gosub set.prob
  152.           a=p1-(p1<>0):a=a-2
  153.           if (pi>4) and (pi<16) then pi=pi+a
  154.           if (pw>4) and (pw<16) then pw=pw+a
  155.           if ps<16 then ps=ps+(a>0)
  156.           if ps>5 then ps=ps-(a<0)
  157.           if hp>16 then hp=hp+(a>0)
  158.           
  159. travel1b
  160.           a=pa:b=ma:gosub set.prob
  161.           zz$=rnd$:x=random(10)
  162.           if (x<=p1) and (mw>0) print \m$" follows!":mf=1:goto travel2
  163.           if mw print \m$" waits for your return":mw=0:mf=0
  164.           
  165. travel2
  166.           ep=ep+1:md=0
  167.           gosub rd.room:mm=mm+1:free:print:if bd gosub scn.dsp
  168.           if (tm-2)=mm print \"The aura surrounding you is fading..."
  169.           if tm=mm print \"The aura has all but left you..."
  170.           if (tm<>0) and (tm<mm) print \"The aura protecting you has vanished.":tm=0
  171.           if not (mm mod 10) then pe=pe-1
  172.           if pe<0 then pe=0
  173.           if mm>9999 then mm=0
  174.           gosub dwarf
  175.           zz$=rnd$:x=random(50):if (x=27) or (x=33) gosub thief
  176.           if mf goto travel2a
  177.           if (cr=df) and (cl=1) then zz$=rnd$:m=random(mc):m=m+(m=0):gosub rd.mons:ms=ms+15:mf=1:m$="DWARF":mw=1:md=0:goto travel2a
  178.           if (cl=sl) and (cr=sr) then dy$=dz$+"spur.duel":link dy$
  179.           if (not m) goto travel2a
  180.           gosub rd.mons:mw=m:md=0
  181.           a$=right$("000"+str$(m),3):if instr(a$,xm$) then md=1:mw=0:mf=0
  182.           
  183. travel2a
  184.           if (not i) goto travel2b
  185.           a$=right$("000"+str$(i),3)+","
  186.           if (instr(a$,xi$)) or (instr(a$,xt$)) then i=0:goto travel2b
  187.           dy$=dx$+"items":rl=30:d=i:gosub rd.file:it$=d$:i=d:i1$=dp$:iv=f
  188.           
  189. travel2b
  190.           if (not wp) goto travel2c
  191.           a$=right$("000"+str$(wp),3)+",":if instr(a$,xw$) then wp=0:goto travel2c
  192.           dy$=dx$+"weapons":rl=34:d=wp:gosub rd.file:wp$=d$:wp=d:wt$=dp$:wv=f
  193.           
  194. travel2c
  195.           if (not fd) goto advent
  196.           a$=right$("000"+str$(fd),3)+","
  197.           if (instr(a$,xf$)) or (instr(a$,xo$)) then fd=0:goto advent
  198.           dy$=dx$+"stores":rl=26:d=fd:gosub rd.file:fd$=d$:fd=d:ft$=dp$:sv=f
  199.           goto advent
  200.           
  201. travel3
  202.           on nocar goto dropped
  203.           if (di=6) and (cr=1) then dy$=dz$+"spur.shop":mf=0:cr=0:link dy$
  204.           if di=5 then cl=cl-1:cr=rt
  205.           if di=6 then cl=cl+1:cr=rt
  206.           if cl=0 then cl=1:mf=0:dy$=dz$+"spur.sub":link dy$,"win"
  207.           f$=dx$+"d.level"+str$(cl):open #1,f$
  208.           input #1,ln$,nr,ri:close #1
  209.           if (not nr) print "Undefined level":cl=1:cr=0:dy$=dz$+"spur.sub":link dy$,"quit"
  210.           print \"You have entered "ln$"!":dr$=dx$+"room.level"+str$(cl):ready dr$
  211.           if di=7 goto travel2
  212.           goto travel1
  213.  
  214. dwarf
  215.           if (not df) return
  216.           zz$=rnd$:x=random(50):if (x<16) or (x>18) return
  217.           if ((gh>0) or(gl>0)) print \'
  218. A         Dwarf runs in, grabs your bag of gold
  219. and       disappears!'\:g1=dh:g2=dl:gosub add.gold:gh=gh+g1:dh=gh:dl=gl:gh=0:gl=0:return
  220.           if xi=0 return
  221.           l=len(xi$)
  222.           a$=right$("000"+str$(og),3)+",":y=instr(a$,xi$):if y goto dwrf.get
  223.           zz$=rnd$:b=random(xi):if b=0 then b=1
  224.           y=(b*4)-3
  225. dwrf.get
  226.           xi=xi-1:if xi=0 then xi$="":goto dwrf.msg
  227.           if y=1 then xi$=mid$(xi$,5):goto dwrf.msg
  228.           if (y+4)>l then xi$=left$(xi$,y-1):goto dwrf.msg
  229.           xi$=left$(xi$,y-1)+mid$(xi$,y+4)
  230.           
  231. dwrf.msg
  232.           print \'
  233. The       dwarf, seeing you are not carrying
  234. any       gold, steals an item from you!'
  235.           return
  236.           
  237. thief
  238.           if tm=>mm print \'
  239. The       THIEF enters the room and is
  240. immediately frightened by the
  241. magical   aura which surrounds you.':return
  242.           if xw<2 return
  243.           zz$=rnd$:x=random(xw):if x=0 then x=1
  244.           dy$=dx$+"weapons":open #1,dy$:gosub drp.wpn
  245.           print \'
  246. The       THIEF enters the room, knocks
  247. you       down, and vanishes!!  In your
  248. haste     to gather your weapons, you
  249. fail      to notice one is missing!'
  250.           return
  251.           
  252.                          ; **************************
  253.                          ; *  Read Spur Data Files  *
  254.                          ; **************************
  255.           
  256. rd.file
  257.           open #1,dy$
  258.           position #1,rl,d
  259.           input #1,cb$\d$\f
  260.           dp$=left$(d$,1):d$=mid$(d$,3):f=f mod 10
  261.           if cb$<>"1" then d$="":d=0:f=0
  262.           close:return
  263.  
  264. rd.mons
  265.           dy$=dx$+"monsters"
  266.           open #1,dy$
  267.           position #1,32,m
  268.           input #1,cb$\m$\ms,sw\ma
  269.           ty$=left$(m$,1):m$=mid$(m$,3)
  270.           if xp>1 then ms=((xp+1)*ms)/2
  271.           close:if (not sw) then sw$="":return
  272.           dy$=dx$+"weapons"
  273.           open #1,dy$
  274.           position #1,34,sw
  275.           input #1,cb$\sw$
  276.           close:sw$=mid$(sw$,3)
  277.           return
  278.  
  279. rd.room
  280.           input #msg(cr),lo$,m,i,wp,fd,n,s,e,w,rc,rt
  281.           edit(0)
  282.           copy #6,#8
  283.           if (n=0) and (s=0) and (e=0) and (w=0) and (rc=0) then cr=cr+3:cr=cr mod nr:cr=cr+1:goto rd.room
  284. rd.room2
  285.           print
  286.           copy #8,#0
  287.           a=pw+pi:if a<10 goto rd.room3
  288.           cf=instr("LABYRINTH",lo$)
  289.           if (cf=0) or (cp=1) goto rd.room4
  290. rd.room3
  291.           print \'[ You are Confused... ]
  292. You       have lost your sense of direction.':return
  293. rd.room4
  294.           print \"Ye may travel:";
  295.           if n print " North";
  296.           if s print " South";
  297.           if e print " East";
  298.           if w print " West";
  299.           if (cf>0) and (cp=1) print:return
  300.           if rc=1 print " Up";
  301.           if rc=2 print " Down";
  302.           print
  303.           return
  304.  
  305. rd.book
  306.           if pi<6 print \"You are not intelligent enough to read...":goto advent
  307.           bk=0:print \"These are your books:"\
  308.           if xi=0 print \"You have no books!!":goto advent
  309.           dy$=dx$+"items"
  310.           open #1,dy$
  311.           for x=1 to xi
  312.           y=(x*4)-3
  313.           a=val(mid$(xi$,y))
  314.           position #1,30,a
  315.           input #1,cb$\n$
  316.           if left$(n$,1)="B" print right$("   "+str$(x),3)". - "mid$(n$,3):bk=bk+1
  317.           next
  318.           if not bk print \"You have no Books!!":close:goto advent
  319.           input @2 \"Read which Book? "x
  320.           if x=0 close:goto advent
  321.           if (x<1) or (x>xi) print \"You don't have that Book!!":close:goto advent
  322.           y=(x*4)-3:a=val(mid$(xi$,y))
  323.           position #1,30,a,2
  324.           input #1,n$:close
  325.           if left$(n$,1)<>"B" print \"This is NOT a Book!!":goto advent
  326.           bk$=dx$+"spur.books":gosub read.bk
  327.           if not edit(2) print \"This Book cannot be read!"
  328.           if pw<10 then pw=pw+1
  329.           print \"That is all."\
  330.           x$=right$("000"+str$(a),3)+",":y=instr(x$,xi$):l=len(xi$)
  331.           print \"The book vanishes in a cloud of smoke!"
  332.           if xt<60 then xt=xt+1:xt$=xt$+x$:goto drp.itm2
  333.           xt$=mid$(xt$,5)+x$
  334.           goto drp.itm2
  335.  
  336. read.bk
  337.           ready bk$
  338.           input #msg(a),n$ 
  339.           print \n$" reads:"\
  340.           copy #6,#0
  341.           ready dr$:return
  342.           
  343.                          ; **********************
  344.                          ; *  DROP Subroutines  *
  345.                          ; **********************
  346.  
  347. drop
  348.           if instr("ITEM",i$) goto drop.itm
  349.           if instr("WEAPON",i$) goto drop.wpn
  350.           print \"You must specify ITEM or WEAPON":goto advent
  351.           
  352. drop.itm
  353.           if xi=0 print "No Items!!":goto advent
  354.           print \"You are carrying:"\
  355.           dy$=dx$+"items"
  356.           open #1,dy$
  357.           for x=1 to xi
  358.           y=(x*4)-3:a=val(mid$(xi$,y))
  359.           position #1,30,a,2
  360.           input #1,n$
  361.           print right$("   "+str$(x),3)". - "mid$(n$,3)
  362.           next:print:close
  363.           
  364.           input @2\"Which item number? "a$:x=val(a$):if a$="" goto advent
  365.           if (x<1) or (x>xi) print "You're NOT carrying that!!":goto advent
  366.           l=len(xi$)
  367.           y=(x*4)-3
  368.           
  369. drp.itm
  370.           close
  371.           print \"Item Dropped..."
  372.           
  373. drp.itm2
  374.           xi=xi-1:if xi=0 then xi$="":goto advent
  375.           if y=1 then xi$=mid$(xi$,5):goto advent
  376.           if (y+4)>l then xi$=left$(xi$,y-1):goto advent
  377.           xi$=left$(xi$,y-1)+mid$(xi$,y+4)
  378.           goto advent
  379.           
  380. clr.cmps
  381.           x$="001,":y=instr(x$,xi$):l=len(xi$)
  382.           if y=0 goto advent
  383.           goto drp.itm
  384.  
  385. drop.wpn
  386.           print \"You are carrying:"\
  387.           dy$=dx$+"weapons"
  388.           open #1,dy$
  389.  
  390.           if xw=0 print "No Weapons!!":close:goto advent
  391.           for x=1 to xw
  392.           y=(x*4)-3
  393.           a=val(mid$(xw$,y))
  394.           position #1,34,a,2
  395.           input #1,n$
  396.           print right$("   "+str$(x),3)". - "mid$(n$,3)
  397.           next:print
  398.           
  399.           input @2\"Which weapon number? "a$:x=val(a$):if a$="" close:goto advent
  400.           if (x<1) or (x>xw) print "You're NOT carrying that!!":close:goto advent
  401.           print \"Weapon dropped...":gosub drp.wpn:goto advent
  402.           
  403. drp.wpn
  404.           l=len(xw$)
  405.           y=(x*4)-3:a=val(mid$(xw$,y))
  406.           xw=xw-1:if xw=0 then xw$="":goto drp.wpn2
  407.           if y=1 then xw$=mid$(xw$,5):goto drp.wpn2
  408.           if (y+4)>l then xw$=left$(xw$,y-1):goto drp.wpn2
  409.           xw$=left$(xw$,y-1)+mid$(xw$,y+4)
  410. drp.wpn2
  411.           cb$="2":if a>10 then cb$="1"
  412.           position #1,34,a
  413.           print #1,cb$
  414.           close:wr$="":return
  415.  
  416.                          ; *********************
  417.                          ; *  GET Subroutines  *
  418.                          ; *********************
  419.           
  420. get
  421.           i$=mid$(i$,5)
  422.           if i$=wp$ goto get.wpn
  423.           if i$=it$ goto get.itm
  424.           if i$=fd$ goto get.fd
  425.           print \i$" is NOT here.":goto advent
  426.  
  427. get.wpn
  428.           if wt$="C" then d$=wp$:d=wv:goto cursed
  429.           if (xw=6) or (pd<8) print \"You can carry no more Weapons.":close:goto advent
  430.           xw=xw+1:a$=right$("000"+str$(wp),3)+",":xw$=xw$+a$
  431.           close
  432.           dy$=dx$+"weapons"
  433.           open #1,dy$
  434.           position #1,34,wp
  435.           print #1,"0"
  436.           close:wp=0:wp$="":goto gotit
  437.           
  438. get.itm
  439.           if i1$="C" then d$=it$:d=iv:goto cursed
  440.           if (xi=15) or (pt<9) print \"You can carry no more Items.":goto advent
  441.           if instr("COINS",it$) then a=random(20)+1:goto get.itm4
  442.           if instr("DIAMOND",it$) then a=random(30)+1:goto get.itm4
  443.           if instr("GOLD",it$) then a=random(15)+1:goto get.itm4
  444.           if instr("SILVER",it$) then a=random(10)+1:goto get.itm4
  445.           if instr("JEWEL",it$) then a=random(8)+1:goto get.itm4
  446.           xi=xi+1:a$=right$("000"+str$(i),3)+",":xi$=xi$+a$
  447.           if (i1$="A") or (i1$="S") print \"Got it!!!":goto get.itm5
  448.           i=0:it$="":goto gotit
  449.           
  450. get.itm4
  451.           g2=iv*a:gosub add.gold
  452.           g1=gh:g2=gl:gosub prt.gold:print \\"You now have "gd$" in Gold."
  453. get.itm5
  454.           a$=right$("000"+str$(i),3)+","
  455.           i=0:it$=""
  456.           if xt<60 then xt=xt+1:xt$=xt$+a$:goto advent
  457.           xt$=mid$(xt$,5)+a$:goto advent
  458.           
  459. get.fd
  460.           if ft$="C" then d$=fd$:d=sv:goto cursed
  461.           if (xf=10) or (pt<9) print \"No room left in your pack.":goto advent
  462.           xf=xf+1:a$=right$("000"+str$(fd),3)+",":xf$=xf$+a$
  463.           fd=0:fd$=""
  464.           if xo<20 then xo=xo+1:xo$=xo$+a$:goto gotit
  465.           xo$=mid$(xo$,5)+a$
  466.           
  467. gotit
  468.           print \"Got it!!!"
  469.           goto advent
  470.           
  471. cursed
  472.           if d=0 then d=10
  473.           print \d$" is Cursed!":a=random(d):d=d-a::pi=pi-a:hp=hp-d:if hp<=0 then xn=sn:sn=0:gosub dead: goto dead2
  474.           if pi<0 then pi=0
  475.           goto advent
  476.  
  477.                          ; ********************
  478.                          ; *  Player Attacks  *
  479.                          ; ********************
  480.  
  481. p.attack
  482.           x1=0
  483.           if wr$="" print \"Must have a weapon readied.":goto subpi
  484.           if (not mw) print \"No monster here.":goto subpi
  485.           if (not au) and (sd=1) gosub at.tune
  486.           ep=ep+1
  487.           a=wa:b=ma:gosub set.prob
  488.           print \"Attack with "wr$:zz$=rnd$:b=random(wd)+2
  489.           if (sw$="") or (p1=0) goto p.a0
  490.           if wr$<>sw$ print \"Missed":goto advent
  491.           p2=10
  492. p.a0
  493.           zz$=rnd$:a=random(10)
  494.           if a>p2 print \"Missed":goto p.a1
  495.           b=b*ws/10
  496.           if sw$<>"" then b=b+2
  497.           ms=ms-b:if ms<=0 goto p.a2
  498.           print \m$" hit!"
  499.           if b>0 print \m$" takes "b" damage.":else print \"No damage!"
  500.           if (b>4) and (pd<15) then pd=pd+1
  501. p.a1
  502.           if a1 then x1$=d1$:x1=h1:a0=a1
  503.           if a2 then x1$=d2$:x1=h2:a0=a2
  504.           if a3 then x1$=d3$:x1=h3:a0=a3
  505.           if not x1 goto advent
  506.           
  507.           print \x1$" attacks "m$" - ";:
  508.           a=a1+a2+a3:a=a mod 10:b=ma:gosub set.prob
  509.           zz$=rnd$:b=random(a0):b=b*p2/10
  510.           if b<3 print "Missed":goto advent
  511.           b=b-3:if b>5 then b=5
  512.           ms=ms-b:if ms<=0 goto p.a2
  513.           print \m$" Hit!"
  514.           if b>0 print \m$" takes "b" damage.":else print \"No damage!"
  515.           goto advent
  516. p.a2
  517.           print \m$" hit!"\m$" Dead!":md=1
  518.           if x1 goto p.a3
  519.           if pw<12 then pw=pw+1
  520.           mk=mk+1
  521.           if mf goto p.a3
  522.           zz$=rnd$:a=random(10):if a<7 goto p.a3
  523.           x$=right$("000"+str$(mw),3)+","
  524.           if xm<15 then xm=xm+1:xm$=xm$+x$:goto p.a3
  525.           xm$=mid$(xm$,5)+x$
  526.           
  527. p.a3
  528.           mf=0:mw=0
  529.           if m$<>"DWARF" goto p.a4
  530.           g1=dh:g2=dl:gosub prt.gold
  531.           print \'Upon killing the Dwarf, you
  532. claim     his treasure of'
  533.           print gd$" gold!"
  534.           gosub add.gold:gh=gh+g1:df=0:dh=0:dl=100
  535.           goto advent
  536.           
  537. p.a4
  538.           a=pa:b=ma:gosub set.prob
  539.           if x1=0 then x=5-p1:else x=(6-p1)/2
  540.           if (hp+x)<26 then hp=hp+x:else hp=25
  541.           a=wa:b=ma:gosub set.prob
  542.           zz$=rnd$:g2=p1*25:g2=g2+random(50)
  543.           print \"You are awarded "g2" gold pieces"
  544.           print "for killing the "m$"!"
  545.           gosub add.gold
  546.           goto advent
  547.           
  548. subpi
  549.           if pi>1 then pi=pi-1
  550.           goto advent
  551.           
  552.                          ; *********************
  553.                          ; *  Monster Attacks  *
  554.                          ; *********************
  555.           
  556. m.attack
  557.           a=pa:b=ma:gosub set.prob
  558.           zz$=rnd$:a=random(10)
  559.           if (ms<2) and (a<=3) print \m$" Misses!":return
  560.           print \m$" attacks ";:x=1
  561.           zz$=rnd$:a=random(10)+1:if a>4 then a=1
  562.           a$=n1$:d=1
  563.           if (a=2) and (a1>0) then a$=d1$:d=2
  564.           if (a=3) and (a2>0) then a$=d2$:d=3
  565.           if (a=4) and (a3>0) then a$=d3$:d=4
  566.           print a$       ;:zz$=rnd$:a=random(10)
  567.           if a<=p2 print " - Hit!":else print " - Misses!":return
  568.           p2=p2+p1:zz$=rnd$:a=random(7):a=a*p2/10:a=a+1
  569.           if d<>1 goto m.a1
  570.           zz$=rnd$:z=random(10)
  571.           if (z<=2) and (sh>0) print "Shield Damaged!":sh=sh-1:a=a-2:if sh<0 then sh=0
  572.           if (z>=8) and (ar>0) print "Armor Damaged!":ar=ar-2:a=a-3:if ar<0 then ar=0
  573.           if (sh<=0) and (hs) print \"Shield gone.":hs=0
  574.           if (ar<=0) and (ra) print \"Armor gone.":ra=0
  575.           if (a<=0) return
  576.           if d=1 then b=a:a=random(a):b=b-a:b=b/2:hp=hp-a:if ps>b then ps=ps-b
  577.           if a print  \"You take "a" damage.":else print \"No body damage!"
  578.           if hp<=0 pop:goto dead
  579.           if (a>4) and (pd>0) then pd=pd-1
  580.           if cp=1 then zz$=rnd$:a=random(100):if (a>54) and (a<60) then cp=0:print \"Compass damaged!":pop:goto clr.cmps
  581.           if ps<4 then wr$="":print \'
  582. Thy       strength is fading...  Unable to
  583. defend    thyself!!'
  584.           return
  585.           
  586. m.a1
  587.           if (d=2) and (a1>0) print d1$" takes "a" damage":a1=a1-a:if a1<=0 print d1$" is dead.":d1$="*":a1=0:x=h1:h1=0:gosub fre.ally
  588.           if (d=3) and (a2>0) print d2$" takes "a" damage":a2=a2-a:if a2<=0 print d2$" is dead.":d2$="*":a2=0:x=h2:h2=0:gosub fre.ally
  589.           if (d=4) and (a3>0) print d3$" takes "a" damage":a3=a3-a:if a3<=0 print d3$" is dead.":d3$="*":a3=0:x=h3:h3=0:goto fre.ally
  590.           return
  591.           
  592.                          ; *************
  593.                          ; *  Examine  *
  594.                          ; *************
  595.           
  596. examine
  597.           a$=mid$(i$,9)
  598.           if a$=it$ then ty$=i1$:goto exam2
  599.           if a$=fd$ then ty$=ft$:goto exam2
  600.           if a$=wp$ then ty$=wt$:goto exam2
  601.           goto exam3
  602. exam2
  603.           zz$=rnd$:a=random(10):if (a>3) and (a<7) print \"Your examination shows nothing.":return
  604.           if not instr(ty$,"MCB") goto exam3
  605.           if ty$="M" print \"This "a$" is Magical."
  606.           if ty$="C" print \"This "a$" is Cursed.":if p1<18 then pi=pi+2
  607.           if ty$="B" print \a$" is a book."
  608.           return
  609. exam3
  610.           print \"There is nothing interesting about this "a$".":return
  611.           
  612.                          ; ***********************
  613.                          ; *  Sound Subroutines  *
  614.                          ; ***********************
  615.           
  616. at.tune
  617.           pl$="134,100,81,67,67,67,67,81,81,81,81,100,81,100,134"
  618.           du$="70,70,90,40,20,20,60,40,20,20,60,70,80,80,180"
  619.           au=1:goto tune
  620.           
  621. die
  622.           pl$="100,100,100,100,85,90,90,100,100,109,100"
  623.           du$="160,100,60,160,100,60,120,60,120,60,200"
  624.           goto tune
  625.           
  626. tune
  627.           p=val(pl$):du=val(du$)
  628.           tone(p,du)
  629.           a=instr(",",pl$):if a=0 return
  630.           pl$=mid$(pl$,a+1)
  631.           a=instr(",",du$):if a=0 return
  632.           du$=mid$(du$,a+1)
  633.           goto tune
  634.  
  635.                          ; **********************
  636.                          ; *  GOLD Subroutines  *
  637.                          ; **********************
  638.           
  639. add.gold
  640.           gl=gl+g2:if gl=>10000 then gl=gl-10000:gh=gh+1
  641.           return
  642.           
  643. prt.gold
  644.           a$=str$(g1):gd$="0000":if g1=0 then gd$="    ":a$=" "
  645.           gd$=right$("    "+a$,5)+right$(gd$+str$(g2),4)
  646.           return
  647.           
  648.                          ; ******************************
  649.                          ; *  Experience Level Message  *
  650.                          ; ******************************
  651.           
  652. lvl.msg
  653.           print'
  654. Congratulations - you have survived to
  655. be        a Level '      ;:print xp" Player!"
  656.           ep=ep+50
  657.           return
  658.           
  659.                          ; ****************
  660.                          ; *  Time Check  *
  661.                          ; ****************
  662.           
  663. tim.chk
  664.           ex=clock(1)-ew:if ex=>ev pop:goto cnf.qt1
  665.           return
  666.           
  667.                          ; ***********************
  668.                          ; *  Set Probabilities  *
  669.                          ; ***********************
  670.           
  671. set.prob
  672.           if a>b then p1=a-b:else p1=b-a
  673.           if p1>5 then p1=10-p1
  674.           p2=p1*2:p2=10-p2+(p1=0)
  675.           return
  676.           
  677.                          ; ************************
  678.                          ; *  Screen Subroutines  *
  679.                          ; ************************
  680.           
  681. scn.dsp
  682.           print #3 @4,23 right$("   "+str$(cl),4)
  683.           print #3 @13,23 right$("    "+str$(cr),4)
  684.           print #3 @4,24 right$("   "+str$(mm),4);
  685.           print #3 @13,24 right$("    "+str$(ep),4);
  686.           print #3 @1,20
  687.           return
  688.           
  689. scn.dsp2
  690.           print #3 @13,24 right$("    "+str$(ep),4);
  691.           print #3 @21,23 right$("  "+str$(ps),3)
  692.           print #3 @29,23 right$("   "+str$(pt),3)
  693.           print #3 @37,23 right$("   "+str$(pw),3)
  694.           print #3 @21,24 right$("  "+str$(pe),3);
  695.           print #3 @29,24 right$("   "+str$(pd),3);
  696.           print #3 @37,24 right$("   "+str$(pi),3);
  697.           print #3 @1,20
  698.           
  699.           if peek(33)=40 goto scn.rtn
  700.           print #3 @45,23 right$(" "+str$(xf),2)
  701.           print #3 @51,23 right$(" "+str$(xi),2)
  702.           print #3 @57,23 right$(" "+str$(xw),2)
  703.           print #3 @63,23 right$("  "+str$(ar),3)
  704.           print #3 @70,23 right$("  "+str$(sh),3)
  705.           print #3 @77,23 right$("  "+str$(mk),3)
  706.           print #3 @45,24 right$(" "+str$(xp),2);
  707.           print #3 @51,24 right$(" "+str$((ev-ex)/60),2);
  708.           g1=gh:g2=gl:gosub prt.gold:print #3 @57,24 gd$;
  709.           print #3 @70,24 right$("  "+str$(df),3);
  710.           print #3 @77,24 right$("  "+str$(sr),3);
  711. scn.rtn
  712.           print #3 @1,20
  713.           return
  714.           
  715. link.sub
  716.           dy$=dz$+"spur.sub"
  717.           link dy$
  718.  
  719. lnk.duel
  720.           if dp print \"You may DUEL only once each session!":goto advent
  721.           dy$=dz$+"spur.duel"
  722.           link dy$
  723.           
  724.                          ; *****************
  725.                          ; *  Player Dies  *
  726.                          ; *****************
  727.           
  728. dead
  729.           mf=0:mw=0:wr$="":xt$="":xt=0:xm$="":xm=0:cp=0:dp=0
  730.           print \"You have not survived The LAND"
  731.           if (sd=1) gosub die
  732.           dy$=dx$+"weapons"
  733.           open #1,dy$
  734.           if xw=0 goto dead1
  735.           for j=1 to xw
  736.           y=(j*4)-3:x=val(mid$(xw$,y))
  737.           if x>10 position #1,34,x:print #1,"1"
  738.           next
  739.           
  740. dead1
  741.           close
  742.           if d1$<>"*" then x=h1:gosub fre.ally
  743.           if d2$<>"*" then x=h2:gosub fre.ally
  744.           if d3$<>"*" then x=h3:gosub fre.ally
  745.           if (not mv) return
  746.           dy$=dx$+"spur.time"
  747.           open #1,dy$
  748.           position #1,12,un
  749.           eu=eu+ex:a$=left$(date$,5)+"":if left$(cm$,5)<>a$ then eu=0
  750.           print #1,a$,eu:close
  751.           return
  752.  
  753. dead2
  754.           on nocar goto dropped
  755.           input @0\"Wouldst Thou enter My LAND again? "i$
  756.           if i$="Y" then ew=clock(1):sn=xn:sl=0:dy$=dz$+"spur.logon":link dy$,"new2"
  757.           cl=0:cr=0:dy$=dz$+"spur.logon":link dy$,"quit1"
  758.  
  759. fre.ally
  760.           dy$=dx$+"allies":open #1,dy$
  761.           position #1,26,x
  762.           print #1,1:close:return
  763.           
  764. cnf.quit
  765.           input @0 \"Leave the Land of SPUR ? "i$
  766.           if i$<>"Y" goto advent
  767. cnf.qt1
  768.           mw=0:mf=0:dy$=dz$+"spur.sub":link dy$,"quit"
  769.           
  770. dropped
  771.           dy$=dz$+"spur.logon"
  772.           link dy$,"quit3"
  773.  
  774. dropdead
  775.           gosub dead:goto dead2
  776.  
  777. dueldead
  778.           on nocar goto dropped
  779.           gosub dead:goto dead2
  780.  
  781.